<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Robocup-denayer-project-a: read-only/trunk/source/vision.cpp Bron Bestand</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Gegenereerd door Doxygen 1.7.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Zoeken');
--></script>
<script type="text/javascript">
function hasClass(ele,cls) {
  return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function addClass(ele,cls) {
  if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}

function removeClass(ele,cls) {
  if (hasClass(ele,cls)) {
    var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
    ele.className=ele.className.replace(reg,' ');
  }
}

function toggleVisibility(linkObj) {
 var base = linkObj.getAttribute('id');
 var summary = document.getElementById(base + '-summary');
 var content = document.getElementById(base + '-content');
 var trigger = document.getElementById(base + '-trigger');
 if ( hasClass(linkObj,'closed') ) {
   summary.style.display = 'none';
   content.style.display = 'block';
   trigger.src = 'open.png';
   removeClass(linkObj,'closed');
   addClass(linkObj,'opened');
 } else if ( hasClass(linkObj,'opened') ) {
   summary.style.display = 'block';
   content.style.display = 'none';
   trigger.src = 'closed.png';
   removeClass(linkObj,'opened');
   addClass(linkObj,'closed');
 }
 return false;
}
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Hoofd&nbsp;Pagina</span></a></li>
      <li><a href="annotated.html"><span>Klassen</span></a></li>
      <li class="current"><a href="files.html"><span>Bestanden</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
          <span class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Zoeken" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </span><span class="right"></span>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&nbsp;Lijst</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>read-only/trunk/source/vision.cpp</h1>  </div>
</div>
<div class="contents">
<a href="vision_8cpp.html">Ga naar de documentatie van dit bestand.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;<a class="code" href="vision_8h.html">vision.h</a>&quot;</span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;<a class="code" href="waypoint_8h.html">movingObject/waypoint.h</a>&quot;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;math.h&gt;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00015"></a>00015 <span class="keyword">using namespace </span>std;
<a name="l00016"></a>00016 
<a name="l00017"></a><a class="code" href="class_vision.html#ad6899fb359fd485afbd309d6d7b0ae1f">00017</a> <a class="code" href="class_vision.html#ad6899fb359fd485afbd309d6d7b0ae1f">Vision::Vision</a>() {
<a name="l00018"></a>00018     this-&gt;i = 0;
<a name="l00019"></a>00019 }
<a name="l00020"></a>00020 
<a name="l00021"></a><a class="code" href="class_vision.html#a12bc039b4fcdb229e70c55d2660392a8">00021</a> <a class="code" href="class_vision.html#a12bc039b4fcdb229e70c55d2660392a8">Vision::~Vision</a>() {
<a name="l00022"></a>00022         <span class="comment">// TODO Auto-generated destructor stub</span>
<a name="l00023"></a>00023 }
<a name="l00024"></a>00024 
<a name="l00031"></a><a class="code" href="class_vision.html#afb4fd3b9f934d20eca32221de26af68c">00031</a> <span class="keywordtype">void</span> <a class="code" href="class_vision.html#afb4fd3b9f934d20eca32221de26af68c" title="Functie uitgevoerd in aparte thread.">Vision::execute</a>(<span class="keywordtype">void</span>)
<a name="l00032"></a>00032 {
<a name="l00033"></a>00033     printf(<span class="stringliteral">&quot;Vision: execute\n&quot;</span>);
<a name="l00034"></a>00034     <span class="keywordtype">int</span> i;
<a name="l00035"></a>00035 
<a name="l00036"></a>00036     <span class="keywordflow">for</span>(i=0;i&lt;10;i++)
<a name="l00037"></a>00037     {
<a name="l00038"></a>00038         <span class="comment">// Verander i!</span>
<a name="l00039"></a>00039         this-&gt;i++;
<a name="l00040"></a>00040         
<a name="l00041"></a>00041         printf(<span class="stringliteral">&quot;Vision: execute: %d\n&quot;</span>,this-&gt;i);
<a name="l00042"></a>00042 
<a name="l00043"></a>00043         sleep(2);
<a name="l00044"></a>00044     }
<a name="l00045"></a>00045 }
<a name="l00046"></a>00046 
<a name="l00051"></a><a class="code" href="class_vision.html#aec79e4b47335403f7548dcc99bbd7f07">00051</a> <span class="keywordtype">void</span> <a class="code" href="class_vision.html#aec79e4b47335403f7548dcc99bbd7f07" title="update waypoints van het bewegend object">Vision::updatePosition</a>(<a class="code" href="class_moving_object.html">MovingObject</a> &amp;<span class="keywordtype">object</span>)
<a name="l00052"></a>00052 {
<a name="l00053"></a>00053     printf(<span class="stringliteral">&quot;Update positie!!!! %d\n&quot;</span>,this-&gt;i);
<a name="l00054"></a>00054     <a class="code" href="class_way_point.html">WayPoint</a> wp;
<a name="l00055"></a>00055 
<a name="l00056"></a>00056     wp.<a class="code" href="class_way_point.html#a89c261b669af94fe8b51903d1337f972" title="Zet X-coordinaat.">setX</a>(this-&gt;i);
<a name="l00057"></a>00057     wp.<a class="code" href="class_way_point.html#a4fb0098a46a3a5e3110820c3647f9f00">setY</a>(this-&gt;i);
<a name="l00058"></a>00058     wp.<a class="code" href="class_way_point.html#ae453bbb3f53e6f4617abada193b6340d" title="Zet de hoek in radialen.">setTheta</a>(this-&gt;i);
<a name="l00059"></a>00059 
<a name="l00060"></a>00060     <span class="keywordtype">object</span>.setWp(wp);
<a name="l00061"></a>00061 
<a name="l00062"></a>00062 }
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Gegenereerd op Do 19 Mei 2011 10:15:29 voor Robocup-denayer-project-a door&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>
